class Item:
   def __init__(self):
      pass

class Room:
   def __init__(self, id, exits, desc, inspect_dict=None, items_dict=None):
      self.desc = desc
      self.exits = exits
      self.inspect = inspect_dict
      for e in self.exits:
         setattr(self, 'move_' + e, move_to)
      if inspect_dict:
         for i in inspect_dict:
            setattr(self, 'inspect_' + i, inspect_dict[i])
      self.id = id

   def get_desc(self):
      return self.desc

rooms = []
global current_room

def init():
   global current_room
   current_room = rooms[0]
   
def get_current_room():
   global current_room
   return current_room

def add_room(room):
   rooms.append(room)
   
def move_to(room_id):
   global current_room
   print "DEBUG >>> moving to: ", str(room_id)
   for r in rooms:
      if r.id == room_id:
         print "DEBUG >>> found room!"
         current_room = r
         return r
   return none